home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / File / DLL / MkStubsOs < prev    next >
Text File  |  1995-09-04  |  4KB  |  185 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.AllocLoad    \
  4.             o.Exists    \
  5.             o.IsDir    \
  6.             o.LoadTo    \
  7.             o.printf    \
  8.             o.SetType    \
  9.             o.Size    \
  10.             o.Date    \
  11.             o.Delete    \
  12.             o.FileOps    \
  13.             o.GetType    \
  14.  
  15.  
  16. LibName        =    File
  17.  
  18.  
  19.  
  20. # Template makefile to make all .o files
  21. # and the SDLS Stubs file for DeskLib
  22. # sublibraries.
  23. # Julian Smith 16 Mar 1995.
  24.  
  25.  
  26. # The macro $(ObjectFiles) should be set at the 
  27. # start of this file, to be a space-separated
  28. # list of object files.
  29. # This is done by 'Makatic'.
  30.  
  31.  
  32. # The macro $(LibName) should also be set at the 
  33. # start of this file, to be the name of the 
  34. # DeskLib sublibrary.
  35. # This is done by 'Makatic'.
  36.  
  37. # Compiler and linker flags, These can be anything. 
  38. # All flags required by Straylight (eg CC -zM and
  39. # Link -rmf) are included in the macros $(CC) and
  40. # $(LINK).
  41. #
  42. CCFlags        =    -fahi $(CCExtra) -depend !Depend -throwback -D_DeskLib_$(LibName) -I,C:
  43. ASMFlags    =    -Stamp -NoCache -CloseExec -Quit $(ASMExtra)
  44.  
  45.  
  46. # Macros for commands, including the Straylight
  47. # tool 'cdll'. Note that DRLink doesn't seem to
  48. # work with the SDLS.
  49. #
  50. CC        =    cc -c -zM -d_DLL -JC:DLLLib.,:mem $(CCFlags)
  51. ASM        =    ObjAsm $(ASMFlags)
  52. CDLL        =    cdll
  53. LINK        =    link
  54. AS        =    as -dde -throwback
  55.  
  56.  
  57. # filename of DLL Stubs aof file. This is linked with client apps.
  58. DLL_Stubs    =    Stubs
  59.  
  60.  
  61. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  62. #
  63. # DLL_Def:        Standard definition file as per SDLS docs.
  64. # DLL_OtherStubsSource    Assembler source to be partially linked into
  65. #            the final stubs file. This will force linking
  66. #            in of stubs from any other DLLs used by this
  67. #            library when a client application is built.
  68. # DLL_PlainStubs    The vanilla stubs file created by SDLS's cdll.
  69. # DLL_OtherStubsObject    Assembled from DLL_OtherStubsSource. This
  70. #            simply imports __DeskLib_SDLS_Stubs_<libname>'s
  71. #            for all DeskLib DLLs used by this library, and
  72. #            exports __DeskLib_SDLS_Stubs_<thislibname>.
  73. #
  74. DLL_Def            =    ^.DLLDef
  75. DLL_OtherStubsSource    =    ^.OtherStubs
  76.  
  77. DLL_PlainStubs        =    PlainStubs
  78. DLL_OtherStubsObject    =    OSObj
  79.  
  80. # -------------------------------------------------------
  81. # Everything below here should probably not be changed...
  82. # -------------------------------------------------------
  83.  
  84.  
  85.  
  86. # Now all the rules...
  87.  
  88.  
  89. # Here's the two things we want to make...
  90. #
  91. All:    $(DLL_Stubs) $(ObjectFiles)
  92.  
  93. $(DLL_Stubs):    $(DLL_PlainStubs) $(DLL_OtherStubsObject)
  94.     $(LINK) -aof -o $@ $(DLL_PlainStubs) $(DLL_OtherStubsObject)
  95.  
  96. $(DLL_PlainStubs):    $(DLL_Def)
  97.     $(CDLL) -def $(DLL_Def) -stub $(DLL_PlainStubs)
  98.  
  99.  
  100. #$(DLL_OtherStubsObject):    $(DLL_OtherStubsSource)
  101. #    $(AS) -o $(DLL_OtherStubsObject) $(DLL_OtherStubsSource)
  102.  
  103. $(DLL_OtherStubsObject):    $(DLL_OtherStubsSource)
  104.     $(ASM) $(ASMFlags) -from $(DLL_OtherStubsSource) -to $(DLL_OtherStubsObject) 
  105.  
  106.  
  107. $(DLL_Def):    
  108.     | Warning: No DLL definition file exists.
  109.     | Creating a default DLL definition file: $(DLL_Def)
  110.     | This will have to be altered by hand.
  111.     $(CDLL) -def $(DLL_Def) -obj $(ObjectFiles)
  112.  
  113.  
  114.  
  115. # Rule for compiling C source code for a Straylight dynamically-linked library.
  116.  
  117. VPATH = @.^
  118.  
  119. .SUFFIXES:    .o .c .s
  120.  
  121. .c.o:
  122.     $(CC) -o $@ $<
  123.  
  124. .s.o:
  125.     $(ASM) $(ASMFlags) -from $< -to $@
  126.  
  127.  
  128.  
  129. # Dynamic dependencies:
  130. o.AllocLoad:    ^.c.AllocLoad
  131. o.AllocLoad:    C:h.stdlib
  132. o.AllocLoad:    DeskLib:h.File
  133. o.AllocLoad:    DeskLib:h.Core
  134. o.AllocLoad:    C:h.stddef
  135. o.AllocLoad:    C:DLLLib.h.dll
  136. o.AllocLoad:    C:h.kernel
  137. o.AllocLoad:    DeskLib:h.SWI
  138. o.Exists:    ^.c.Exists
  139. o.Exists:    DeskLib:h.File
  140. o.Exists:    DeskLib:h.Core
  141. o.Exists:    C:h.stddef
  142. o.Exists:    C:DLLLib.h.dll
  143. o.Exists:    C:h.kernel
  144. o.Exists:    DeskLib:h.SWI
  145. o.Exists:    C:h.kernel
  146. o.IsDir:    ^.c.IsDir
  147. o.IsDir:    DeskLib:h.Core
  148. o.IsDir:    C:h.stddef
  149. o.IsDir:    C:DLLLib.h.dll
  150. o.IsDir:    C:h.kernel
  151. o.IsDir:    DeskLib:h.File
  152. o.IsDir:    DeskLib:h.SWI
  153. o.IsDir:    DeskLib:h.SWI
  154. o.LoadTo:    ^.c.LoadTo
  155. o.LoadTo:    C:h.kernel
  156. o.LoadTo:    DeskLib:h.Core
  157. o.LoadTo:    C:h.stddef
  158. o.LoadTo:    C:DLLLib.h.dll
  159. o.LoadTo:    DeskLib:h.SWI
  160. o.LoadTo:    DeskLib:h.File
  161. o.printf:    ^.c.printf
  162. o.printf:    C:h.stdarg
  163. o.printf:    C:h.stdio
  164. o.printf:    DeskLib:h.File
  165. o.printf:    DeskLib:h.Core
  166. o.printf:    C:h.stddef
  167. o.printf:    C:DLLLib.h.dll
  168. o.printf:    C:h.kernel
  169. o.printf:    DeskLib:h.SWI
  170. o.SetType:    ^.c.SetType
  171. o.SetType:    C:h.kernel
  172. o.SetType:    DeskLib:h.File
  173. o.SetType:    DeskLib:h.Core
  174. o.SetType:    C:h.stddef
  175. o.SetType:    C:DLLLib.h.dll
  176. o.SetType:    DeskLib:h.SWI
  177. o.Size:    ^.c.Size
  178. o.Size:    C:h.kernel
  179. o.Size:    DeskLib:h.file
  180. o.Size:    DeskLib:h.Core
  181. o.Size:    C:h.stddef
  182. o.Size:    C:DLLLib.h.dll
  183. o.Size:    DeskLib:h.SWI
  184.